//
//  JGControlEvent.h
//  JGGameController
//
//  Created by jagger.tu on 2024/12/25.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

typedef NS_ENUM(NSInteger,JGControlEventType) {
    JGControlEventTypeUnknown = 0x0,
    JGControlEventTypeGamepad = 0x01,
    JGControlEventTypeKeyboard = 0x02,
    JGControlEventTypeMouseButton = 0x03,
    JGControlEventTypeMouseWheelScroll = 0x04,
    JGControlEventTypeMouseMove = 0x05,
    JGControlEventTypeTouch = 0x06,
    JGControlEventTypePassThroughTouch = 0x07
};
#ifndef JG_CONTROL_EVENT_RELEASE
#define JG_CONTROL_EVENT_RELEASE(buff) {if(!buff) free(buff);}
#endif

/// 产生的事件
@interface JGControlEvent : NSObject

/// 是否pc游戏
@property (nonatomic, assign) BOOL isPcGame;

/// 事件类型
@property(nonatomic,assign,readonly) JGControlEventType eventType;

- (void)buff:(void *_Nullable*_Nullable)buff size:(int*)size;

@end

NS_ASSUME_NONNULL_END
